<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head>
    <th:block th:include="include :: header('修改入库单')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-stockin-edit" th:object="${stockin}">
            <input id="stockinGuid" name="stockinGuid" th:field="*{stockinGuid}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">入库单主表id：</label>
                <div class="col-sm-8">
                    <input id="stockinId" name="stockinId" th:field="*{stockinId}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">入库类型：</label>
                <div class="col-sm-8">
                    <select id="inType" name="inTyepe" th:field="*{inType}" class="layui-form-selected">
                        <option value="1">WMS建单入库</option>
                        <option value="2">ERP入库</option>
                        <option value="3">OMS入库</option>
                    </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">建单时间：</label>
                <div class="col-sm-8">
                    <input id="createDate" name="createDate" th:field="*{createDate}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">供应商id：</label>
                <div class="col-sm-8">
                    <input id="supplierId" name="supplierId" th:field="*{supplierId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">客户id：</label>
                <div class="col-sm-8">
                    <input id="customerId" name="customerId" th:field="*{customerId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">建单人id：</label>
                <div class="col-sm-8">
                    <input id="createManId" name="createManId" th:field="*{createManId}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">单据状态：</label>
                <div class="col-sm-8">
                    <select id="status" name="status" th:field="*{status}" class="layui-form-select">
                        <option value="">---请选择---</option>
                        <option value="1">入库开单</option>
                        <option value="2">已审核</option>
                        <option value="3">单据执行</option>
                        <option value="4">执行完成</option>
                        <option value="5">单据确认</option>
                        <option value="6">单据作废</option>
                        <option value="7">回传完成</option>
                    </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">库房id：</label>
                <div class="col-sm-8">
                    <input id="warehouseId" name="warehouseId" th:field="*{warehouseId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">订单来源：</label>
                <div class="col-sm-8">
                    <select id="stockinSource" name="stockinSource" th:field="*{stockinSource}" class="layui-form-select">
                        <option value="1">WMS建单入库</option>
                        <option value="2">ERP入库</option>
                        <option value="3">OMS入库</option>
                    </select>
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">当前班组id：</label>
                <div class="col-sm-8">
                    <input id="classNowId" name="classNowId" th:field="*{classNowId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">生产线编号 ：</label>
                <div class="col-sm-8">
                    <input id="lineId" name="lineId" th:field="*{lineId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">完成时间：</label>
                <div class="col-sm-8">
                    <input id="finishDate" name="finishDate" th:field="*{finishDate}" class="form-control" type="text">
                </div>
            </div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "mydo/stockinmanage"

        function submitHandler() {
            var data = $("#form-stockin-edit").serializeArray();
            console.log(data)
            //TODO 如果沒有选择项目组（项目组为空 不允许提交）
            $.operate.save(prefix + "/edit", data);
        }
	</script>
</body>
</html>
